package edu.kit.aifb.evtcrawl.pachube.structure;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;

@JsonIgnoreProperties(ignoreUnknown = true)
public class PachubeFeed {
	private String description;
	private String feed;
	private String id;
	private String status;
	private String title;
	private String website;
	private String updated;
	private String created;
	private String version;
	private String creator;
	private String[] tags;
	private PachubeLocation location;
	private PachubeDatastream[] datastreams;
	
	@Override
	public String toString(){
		String result = "feed " + id + ":\n";
		result += " description: " + description + "\n";
		result += " feed: " + feed + "\n";
		result += " id: " + id + "\n";
		result += " status: " + status + "\n";
		result += " title: " + title + "\n";
		result += " website: " + website + "\n";
		result += " updated: " + updated + "\n";
		result += " created: " + created + "\n";
		result += " version: " + version + "\n";
		result += " creator: " + creator + "\n";
		if(tags != null && tags.length > 0){
			result += " tags: ";
			for(int i = 0; i < tags.length; i++){
				result += "'" + tags[i] + "'";
				if(!(i == tags.length - 1)) result += ", ";
			}
			result += "\n";
		}
		
		result += location.toString();
		
		if(datastreams != null && datastreams.length > 0){
			result += " datastreams: \n";
			for(int i = 0; i < datastreams.length; i++){
				result += datastreams[i].toString();
			}
			result += "\n";
		}
		return result;
	}
	
	public String getDescription() {
		return description;
	}
	public String getFeed() {
		return feed;
	}
	public String getId() {
		return id;
	}
	public String getStatus() {
		return status;
	}
	public String getTitle() {
		return title;
	}
	public String getWebsite() {
		return website;
	}
	public String getUpdated() {
		return updated;
	}
	public String getCreated() {
		return created;
	}
	public String getVersion() {
		return version;
	}
	public String getCreator() {
		return creator;
	}
	public String[] getTags() {
		return tags;
	}
	public PachubeLocation getLocation() {
		return location;
	}
	public PachubeDatastream[] getDatastreams() {
		return datastreams;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public void setFeed(String feed) {
		this.feed = feed;
	}
	public void setId(String id) {
		this.id = id;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public void setWebsite(String website) {
		this.website = website;
	}
	public void setUpdated(String updated) {
		this.updated = updated;
	}
	public void setCreated(String created) {
		this.created = created;
	}
	public void setVersion(String version) {
		this.version = version;
	}
	public void setCreator(String creator) {
		this.creator = creator;
	}
	public void setTags(String[] tags) {
		this.tags = tags;
	}
	public void setLocation(PachubeLocation location) {
		this.location = location;
	}
	public void setDatastreams(PachubeDatastream[] datastreams) {
		this.datastreams = datastreams;
	}
}
